package com.qj.yantaishan.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qj.yantaishan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;
import com.qj.yantaishan.mapper.ProductToPropertyMapper;
import com.qj.yantaishan.domain.ProductToProperty;
import com.qj.yantaishan.service.IProductToPropertyService;
import com.qj.yantaishan.common.core.text.Convert;

/**
 * 商品关联属性idService业务层处理
 * 
 * @author qihe
 * @date 2022-07-22
 */
@Service
@Primary
public class ProductToPropertyServiceImpl    extends ServiceImpl<ProductToPropertyMapper, ProductToProperty>  implements IProductToPropertyService
{
    @Autowired
    private ProductToPropertyMapper productToPropertyMapper;

    /**
     * 查询商品关联属性id
     * 
     * @param pigcmsId 商品关联属性id主键
     * @return 商品关联属性id
     */
    @Override
    public ProductToProperty selectProductToPropertyByPigcmsId(Integer pigcmsId)
    {
        return productToPropertyMapper.selectProductToPropertyByPigcmsId(pigcmsId);
    }

    /**
     * 查询商品关联属性id列表
     * 
     * @param productToProperty 商品关联属性id
     * @return 商品关联属性id
     */
    @Override
    public List<ProductToProperty> selectProductToPropertyList(ProductToProperty productToProperty)
    {
        return productToPropertyMapper.selectProductToPropertyList(productToProperty);
    }

    /**
     * 新增商品关联属性id
     * 
     * @param productToProperty 商品关联属性id
     * @return 结果
     */
    @Override
    public int insertProductToProperty(ProductToProperty productToProperty)
    {
        return productToPropertyMapper.insertProductToProperty(productToProperty);
    }

    /**
     * 修改商品关联属性id
     * 
     * @param productToProperty 商品关联属性id
     * @return 结果
     */
    @Override
    public int updateProductToProperty(ProductToProperty productToProperty)
    {

        return productToPropertyMapper.updateProductToProperty(productToProperty);
    }

    /**
     * 批量删除商品关联属性id
     * 
     * @param pigcmsIds 需要删除的商品关联属性id主键
     * @return 结果
     */
    @Override
    public int deleteProductToPropertyByPigcmsIds(String pigcmsIds)
    {
        return productToPropertyMapper.deleteProductToPropertyByPigcmsIds(Convert.toStrArray(pigcmsIds));
    }

    /**
     * 删除商品关联属性id信息
     * 
     * @param pigcmsId 商品关联属性id主键
     * @return 结果
     */
    @Override
    public int deleteProductToPropertyByPigcmsId(Integer pigcmsId)
    {
        return productToPropertyMapper.deleteProductToPropertyByPigcmsId(pigcmsId);
    }
}
